﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="addClassAttribute.aspx.cs" Inherits="Admin_addClassAttribute" %>
<%@ Register Src="adminfoot.ascx" TagName="adminfoot" TagPrefix="uc1" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <link rel="stylesheet" href="imgs/admin.css" type="text/css" media="all" />
    <script type="text/javascript" src="../DotNet_net/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../DotNet_net/js/jquery.form.js"></script>
    <script type="text/javascript" src="../DotNet_net/js/common.js"></script>
    <script type="text/javascript" src="imgs/GetAjax.js"></script>
</head>
<body onload='$("#loading").hide()'>   
<div class="container" id="cpcontainer">
<div id="loading" style="display:block">   
    <div class="loading-indicator">   
        页面正在加载中...   
    </div>   
</div>
<form name="addform" id="addformAjax"  method="post"  >
<table class="tb">
<tr class="thead">
    <th colspan="2">
        添加类别属性</th>
</tr>
<tr id="createDir">
<td style="width: 134px; height: 44px;" align="right" colspan="" rowspan="">
    类别描述：</td>
<td style="text-align:left; height: 44px;">
    &nbsp;<textarea id="txt_cDescription" name="txt_cDescription" style="width: 446px; height: 96px" runat="server"></textarea></td>
</tr>
<tbody id="mainContent">
<tr><td colspan='2' style="height: 27px">&nbsp;<img src='imgs/btn_add.gif' class='pointer' align='absmiddle' onclick="$('#seo').stop().toggle()"/>&nbsp;&nbsp;<font color="red">产品优化设置(包括头部,关键字,描述,底部)</font></td></tr>
<tr><td colspan='2' id="seotd">
	<table id="seo" width="100%" style="display:none;">
    <tr>
        <td align="right" style="height: 56px;width:70px">
            页面标题：</td>
        <td style="height: 56px">
            <textarea id="cTitle" name="cTitle" style="width: 490px; height: 69px" runat="server">例如:XXXXX产品-xxx公司名称</textarea></td>
    </tr>
    <tr>
        <td align="right" style="height: 56px;width:70px">
            关键字：<td style="height: 56px">
            <textarea id="cKey" name="cKey" style="width: 490px; height: 69px" runat="server">例如:关键字A 关键字B 关键字C 关键字D 关键字E 最后是5个,(过多的关键字会导致惩罚)</textarea></td>
    </tr>
    <tr>
        <td align="right" style="height: 56px;width:70px">
            页面描述：</td>
        <td style="height: 56px">
            <textarea id="cDescription" name="cDescription" style="width: 490px; height: 69px" runat="server">例如:优网公司专门从事企业网站建设,优化,整合服务一体的的外包公司,提供最专业,最稳定,及最实惠的服务(简短不超过100中文字个描述)</textarea></td>
    </tr>
    </table>
  </td>
</tr>
<tr>
  <td align="right" height="22" style="width: 134px"></td>
  <td>
      </td>
</tr>
<tr>
  <td align="right" height="22" style="width: 134px">
      产品类之间的关系图：</td>
   <td>
       <fckeditorv2:fckeditor id="FCKeditor1" runat="server" height="300px" toolbarset="Zrnet"
           width="650px" ></fckeditorv2:fckeditor>
       </td>
</tr>
<tr>
   <td style="height: 27px; width: 134px;"></td> <td class="forumRow" style="height: 27px" ><input type="button" class="btn" value="确认保存" name="Submit" id="tijiao"  />&nbsp;<input type="reset" class="btn" value="清 除"  onclick="resetCon('FCKeditor1')">&nbsp;<input type=button class="btn" value="返　回" onClick="javascript:location.href='adminProductClass.aspx';"/>
       <input id="pClassID_hid" name="pClassID" type="hidden" runat="server" />
       <input id="classAttributeID" runat="server" name="classAttributeID" type="hidden" /></td>
</tr>
</tbody>
</table>
<uc1:adminfoot ID="Adminfoot1" runat="server" />
</form>  
</div>
   
<script type="text/javascript">
function resetCon(source) {
    //document.addform.reset();
    var oEditor=FCKeditorAPI.GetInstance(source).EditorDocument.body.innerHTML="";
    return false;
}
</script>
<script type="text/javascript">
$(document).ready(function(){
    var options = { 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse,  // post-submit callback 
        // other available options: 
         url:       "?action=insert",         // override for form's 'action' attribute 
       // type:        'post'        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        clearForm: false,        // clear all form fields after successful submit 
        resetForm: false        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
    }; 
    $('#tijiao').click(function(){       
            $("#loading").show();    
            var oEditor = FCKeditorAPI.GetInstance("FCKeditor1") ;   
            oEditor.UpdateLinkedField(); 
            $('#addformAjax').ajaxSubmit(options);
            return false;            
    });
})
function showResponse(msg){ 
   if(msg=="1")   
   {
      alert("保存成功！");
      location.href="adminProductClass.aspx";
   }
   else
   {
       alert(msg);  
       $("#loading").hide(); 
   }      
  
} 
function showRequest(formData, jqForm, options)
{ 
    return true; 
} 
</script>
</body>
</html>
